package com.dahua.simplefactory.version4;

/**
 * @author sunhongguang
 * @create 2022-01-09-12:03
 */
public class OperationDiv extends Operation {
    @Override
    public double getResult() {
        if(numberB != 0){
            return  numberA / numberB;
        }else {
            throw new RuntimeException("除数不能为0!");
        }
    }
}
